import axios from "axios";

export const postProgress = (data,onProgress) => {
  return axios({
    url: 'http://47.109.137.14/wechat/wxList',
    method: 'post',
    data: data,
    onDownloadProgress: function (progressEvent) {
      if (progressEvent.lengthComputable) {
        const percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total);
        if (onProgress) {
          onProgress(percentCompleted);
        }
      }
    }
  })
};